package homework06;

import java.util.Comparator;

public class PubDateComparator implements Comparator<Job> {

	@Override
	public int compare(Job o1, Job o2) {
		if (o1.getPubDate().before(o2.getPubDate())) {
			return 1;
		} else if (o1.getPubDate().after(o2.getPubDate())) {
			return -1;
		} else {
			return 0;
		}
	}

}
